import redis

from app.settings import REDIS_HOST, REDIS_PORT, REDIS_AUTH

pool = redis.ConnectionPool(
    host=REDIS_HOST,
    port=REDIS_PORT,
    password=REDIS_AUTH,
    decode_responses=True
)


def get_redis() -> redis.Redis:
    r = redis.Redis(connection_pool=pool)
    return r
